package org.coone.netproxy.utils;

public class StringUtil {

	public static boolean isEmpty(String str) {
		return str == null || "".equals(str.trim()) ? true : false;
	}

	public static boolean isNotEmpty(String str) {
		return str == null || "".equals(str.trim()) ? false : true;
	}
	
	public static void printBytes(byte[] srcBytes) {
		for (int i = 0; i < srcBytes.length; i++) {
			byte b = srcBytes[i];
			int tmpbyte = (b >> 4) & 0x0F;
			int tmpbyte2 = b & 0x0F;
			System.out.print(Integer.toHexString(tmpbyte) + Integer.toHexString(tmpbyte2) + " ");
			
			if(i%48 == 0) {
				System.out.println();
			}
		}
		
		System.out.println();
	}
}
